include(['world.EntityAttachment'],

function(){

	declare('world.EntityImageAttachment');

    try{ world = world || {}; }
    catch(e){ world = {}; }

    world.EntityImageAttachment = world.EntityAttachment.extend({
        _image : null,
        _size  : {width: 0, height: 0},

        init : function(image){
		this._image = image;
		this._size = {width:100, height:100};
        }
        ,render : function(e){
	   this.renderImage(e.entity, e.gamewindow);

        }
        ,renderImage : function(entity, gamewindow){
            var width = this._size.width;
            var height = this._size.height;

            gamewindow.draw(this._image, (entity.imageIndex + (entity.imageSeq*17)) * 100, 0, width, height, entity.x, entity.y, width, height);
        }
    })

});